package com.sybil.ot.dominio;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class HistoricoOTPK implements Serializable {

   private String serieOT;
   private int numeroOT;
   private int numeroHistorico;

   public HistoricoOTPK() {
   }

   public HistoricoOTPK(String serieOT, int numeroOT, int numeroHistorico) {
      this.serieOT = serieOT;
      this.numeroOT = numeroOT;
      this.numeroHistorico = numeroHistorico;
   }

   @Basic(optional = false)
   @Column(name = "HIOT_ORTR_SERIE")
   public String getSerieOT() {
      return serieOT;
   }

   public void setSerieOT(String serieOT) {
      this.serieOT = serieOT;
   }

   @Basic(optional = false)
   @Column(name = "HIOT_ORTR_NUMERO")
   public int getNumeroOT() {
      return numeroOT;
   }

   public void setNumeroOT(int numeroOT) {
      this.numeroOT = numeroOT;
   }

   @Basic(optional = false)
   @Column(name = "HIOT_NUMERO")
   public int getNumeroHistorico() {
      return numeroHistorico;
   }

   public void setNumeroHistorico(int numeroHistorico) {
      this.numeroHistorico = numeroHistorico;
   }

   @Override
   public int hashCode() {
      int hash = 0;
      hash += (serieOT != null ? serieOT.hashCode() : 0);
      hash += (int) numeroOT;
      hash += (int) numeroHistorico;
      return hash;
   }

   @Override
   public boolean equals(Object object) {
      if (!(object instanceof HistoricoOTPK)) {
         return false;
      }
      HistoricoOTPK other = (HistoricoOTPK) object;
      if ((this.serieOT == null && other.serieOT != null) || (this.serieOT != null && !this.serieOT.equals(other.serieOT))) {
         return false;
      }
      if (this.numeroOT != other.numeroOT) {
         return false;
      }
      if (this.numeroHistorico != other.numeroHistorico) {
         return false;
      }
      return true;
   }

   @Override
   public String toString() {
      return "HistoricoOTPK[ serieOT=" + serieOT + ", numeroOT=" + numeroOT + ", numeroHistorico=" + numeroHistorico + " ]";
   }
}
